package com.yupi.ojjudge.judge.codesandbox;

import com.yupi.ojjudge.judge.codesandbox.impl.ExampleCodeSandBox;
import com.yupi.ojjudge.judge.codesandbox.impl.RemoteCodeSandBox;
import com.yupi.ojjudge.judge.codesandbox.impl.ThirdPartyCodeSandBox;

/**
 * @Author ortonzhu
 * @Date 2024/10/18 19:42
 */
public class CodeSandBoxFactory {

    public static CodeSandBox newInstance(String type) {
        switch (type) {
            case "remote":
                return new RemoteCodeSandBox();
            case "thirtyParty":
                return new ThirdPartyCodeSandBox();
            default:
                return new ExampleCodeSandBox();
        }
    }
}
